home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD 5.bin / workbench / libs / reqtoolsdev.lha / ReqTools / Glue / MaxonPascal / RT-MaxonPAS.lha / MaxonPASCAL / Source / ReqtoolsV0.06.p next >
Text File  |  1994-10-13  |  20KB  |  512 lines

  1. { Unit:      Reqtools
  2.   ~~~~~
  3.   Version:   V0.06 / 08.08.94
  4.   ~~~~~~~~
  5.   Meaning:   Reqtools-Interface for KickPascal2.12/OS2
  6.   ~~~~~~~    or MaxonPASCAL3 (compile it)
  7.  
  8.              for Reqtools.library V38 (last 2.2a / V38.1194)
  9.  
  10.   Copyright: © by the cooperation of
  11.   ~~~~~~~~~~
  12.                PackMAN (Falk Zühlsdorff)
  13.  
  14.                 and
  15.  
  16.                Janosh (Jan Stötzer)
  17.  
  18.                for all KP/MP3 Interface / Demos / Includes / Units
  19.  
  20.              This version is FREEWARE (see © Reqtools.librray)
  21.  
  22.              © Nico François for the reqtools.library
  23.  
  24.  
  25.   Author:    all OS2 versions are  written by PackMAN
  26.   ~~~~~~~
  27.   Address:   PackMAN
  28.   ~~~~~~~~   c/o Falk Zühlsdorff
  29.              Lindenberg 66
  30.              98693 Ilmenau/Thuringia
  31.  
  32.              Germany
  33.  
  34.   Comment:   only OS2 or higher now
  35.   ~~~~~~~~                                                           }
  36.  
  37. {--------------------------------------------------------------------}
  38. UNIT REQTOOLS;
  39.  
  40. INTERFACE
  41.  
  42. USES INTUITION;
  43.  
  44. CONST
  45.   REQTOOLSNAME = 'reqtools.library';
  46.   REQTOOLSVERSION = 38;
  47.  
  48. TYPE
  49.   BPTR     = long;
  50.   p_ReqToolsBase = ^ReqToolsBase;
  51.   ReqToolsBase = Record
  52.                    Lib_Node : p_Library;
  53.                    Flags    : Byte;
  54.                    Pad      : Array[0..3] of Byte;
  55.                    SegList  : BPTR;
  56.                    IntuitionBase: p_Library;
  57.                    GfxBase  : p_Library;
  58.                    DOSBase  : p_Library;
  59.                    GadToolsBase : p_Library;
  60.                    UtilityBase  : p_Library;
  61.                  END;
  62.  
  63. CONST
  64.  
  65.   RT_FILEREQ = 0;
  66.   RT_REQINFO = 1;
  67.   RT_FONTREQ = 2;
  68.   RT_SCREENMODEREQ = 3;
  69.  
  70. TYPE
  71.  
  72.   p_rtFileRequester = ^rtFileRequester;
  73.   rtFileRequester   = record
  74.                         ReqPos      : long;
  75.                         LeftOffset  : integer;
  76.                         TopOffset   : integer;
  77.                         Flags       : long;
  78.                         Hook        : p_Hook;
  79.                         Dir         : str;
  80.                         MatchPat    : str;
  81.                         DefaultFont : p_TextFont;
  82.                         WaitPointer : long;
  83.                         LockWindow  : long;
  84.                         ShareIDCMP  : long;
  85.                         IntuiMsgFunc: p_Hook;
  86.                         reserved1   : integer;
  87.                         reserved2   : integer;
  88.                         reserved3   : integer;
  89.                         ReqHeight   : integer;
  90.                       END;
  91.  
  92.   p_rtFileList = ^rtFileList;
  93.   rtFileList = record
  94.                  Next    : p_rtFileList;
  95.                  StrLen  : long;
  96.                  Name    : str;
  97.                END;
  98.  
  99.   p_rtFontRequester = ^rtFontRequester;
  100.   rtFontRequester = record
  101.                       ReqPos        : long;
  102.                       LeftOffset    : integer;
  103.                       TopOffset     : integer;
  104.                       Flags         : long;
  105.                       Hook          : p_Hook;
  106.                       Attr          : TextAttr;
  107.                       DefaultFont   : p_TextFont;
  108.                       WaitPointer   : long;
  109.                       LockWindow    : long;
  110.                       ShareIDCMP    : long;
  111.                       IntuiMsgFunc  : p_Hook;
  112.                       reserved1     : integer;
  113.                       reserved2     : integer;
  114.                       reserved3     : integer;
  115.                       ReqHeight     : integer;
  116.                     END;
  117.  
  118. { structure _MUST_ be allocated with rtAllocRequest() }
  119.  
  120.   p_rtScreenModeRequester = ^rtScreenModeRequester;
  121.   rtScreenModeRequester = Record
  122.                             ReqPos      : long;
  123.                             LeftOffset  : integer;
  124.                             TopOffset   : integer;
  125.                             Flags       : long;
  126.                             private1    : long;
  127.                             DisplayID   : long;  { READ ONLY! }
  128.                             DisplayWidth: integer;    { READ ONLY! }
  129.                             DisplayHeight: integer;   { READ ONLY! }
  130.                             DefaultFont : p_TextFont;
  131.                             WaitPointer : long;
  132.                             LockWindow  : long;
  133.                             ShareIDCMP  : long;
  134.                             IntuiMsgFunc: p_Hook;
  135.                             reserved1   : integer;
  136.                             reserved2   : integer;
  137.                             reserved3   : integer;
  138.                             ReqHeight   : integer;    { READ ONLY!  Use RTSC_Height tag! }
  139.                             DisplayDepth: integer;    { READ ONLY! }
  140.                             OverscanType: integer;    { READ ONLY! }
  141.                             AutoScroll  : long;  { READ ONLY! }
  142.                             { Private data follows! HANDS OFF }
  143.                           END;
  144.  
  145. {***********************
  146. *                      *
  147. *    Requester Info    *
  148. *                      *
  149. ***********************}
  150.  
  151. { for rtEZRequestA(), rtGetLongA(), rtGetStringA() and rtPaletteRequestA(),
  152.    _MUST_ be allocated with rtAllocRequest() }
  153.  
  154.   p_rtReqInfo = ^rtReqInfo;
  155.   rtReqInfo = Record
  156.                 ReqPos      : long;
  157.                 LeftOffset  : integer;
  158.                 TopOffset   : integer;
  159.                 Width       : long;       { not for rtEZRequestA() }
  160.                 ReqTitle    : str;        { currently only for rtEZRequestA() }
  161.                 Flags       : long;       { currently only for rtEZRequestA() }
  162.                 DefaultFont : p_TextFont; { currently only for rtPaletteRequestA() }
  163.                 WaitPointer : long;
  164.                 { (V38) }
  165.                 LockWindow  : long;
  166.                 ShareIDCMP  : long;
  167.                 IntuiMsgFunc: p_Hook;
  168.                 { structure may be extended in future }
  169.               END;
  170.  
  171. {***********************
  172. *                      *
  173. *     Handler Info     *
  174. *                      *
  175. ***********************}
  176.  
  177. { for rtReqHandlerA(), will be allocated for you when you use
  178.    the RT_ReqHandler tag, never try to allocate this yourself! }
  179.  
  180.   p_rtHandlerInfo = ^rtHandlerInfo;
  181.   rtHandlerInfo = record
  182.                     private1  : long;
  183.                     WaitMask  : long;
  184.                     DoNotWait : long;
  185.                     { Private data follows, HANDS OFF }
  186.                   END;
  187.  
  188. CONST
  189.  
  190. { possible return codes from rtReqHandlerA() }
  191.  
  192.   CALL_HANDLER = $80000000;
  193.  
  194. {*************************************
  195. *                                    *
  196. *                TAGS                *
  197. *                                    *
  198. *************************************}
  199.  
  200.   RT_TagBase = TAG_USER;
  201.  
  202. { *** tags understood by most requester functions *** }
  203.  
  204. RT_Window       = $80000001; { Optional pointer to window }
  205. RT_IDCMPFlags   = $80000002; { idcmp flags requester should abort on (useful for IDCMP_DISKINSERTED) }
  206. RT_ReqPos       = $80000003; { position of requester window (see below) - default REQPOS_POINTER }
  207. RT_LeftOffset   = $80000004; { signal mask to wait for abort signal }
  208. RT_TopOffset    = $80000005; { topedge offset of requester relative to position specified by RT_ReqPos }
  209. RT_PubScrName   = $80000006; { name of public screen to put requester on (Kickstart 2.0 only!) }
  210. RT_Screen       = $80000007; { address of screen to put requester on }
  211. RT_ReqHandler   = $80000008; { tagdata must hold the address of (!) an APTR variable }
  212. RT_DefaultFont  = $80000009; { font to use when screen font is rejected, _MUST_ be fixed-width font! pTextFont , not pTextAttr ) - default GfxBase^.DefaultFont }
  213.  
  214. RT_WaitPointer  = $8000000A; { boolean to set the standard wait pointer in window - default FALSE }
  215. RT_Underscore   = $8000000B; { (V38) char preceding keyboard shortcut characters (will be underlined) }
  216. RT_ShareIDCMP   = $8000000C; { (V38) share IDCMP port with window - default FALSE }
  217. RT_LockWindow   = $8000000D; { (V38) lock window and set standard wait pointer - default FALSE }
  218. RT_ScreenToFront= $8000000E; { (V38) boolean to make requester's screen pop to front - default TRUE }
  219. RT_TextAttr     = $8000000F; { (V38) Requester should use this font - default: screen font }
  220. RT_IntuiMsgFunc = $80000010; { (V38) call this hook for every IDCMP message not for requester }
  221. RT_Locale       = $80000011; { (V38) Locale ReqTools should use for text }
  222.  
  223. { *** tags specific to rtEZRequestA *** }
  224.  
  225. RTEZ_ReqTitle   = $80000014; { title of requester window - english default "Request" or "Information" }
  226.                              { ($80000015) reserved }
  227. RTEZ_Flags      = $80000016; { various flags (see below) }
  228. RTEZ_DefaultResponse
  229.                 = $80000017; { default response (activated by pressing RETURN) - default TRUE }
  230.  
  231. { *** tags specific to rtGetLongA *** }
  232.  
  233. RTGL_Min        = $8000001E; { minimum allowed value - default MININT }
  234. RTGL_Max        = $8000001F; { maximum allowed value - default MAXINT }
  235. RTGL_Width      = $80000020; { suggested width of requester window (in pixels) }
  236. RTGL_ShowDefault= $80000021; { boolean to show the default value - default TRUE }
  237. RTGL_GadFmt     = $80000022; { (V38) string with possible responses - english default " _Ok |_Cancel" }
  238. RTGL_GadFmtArgs = $80000023; { (V38) optional arguments for RTGL_GadFmt }
  239. RTGL_Invisible  = $80000024; { (V38) invisible typing - default FALSE }
  240. RTGL_Backfill   = $80000025; { (V38) window backfill - default TRUE }
  241. RTGL_TextFmt    = $80000026; { (V38) optional text above gadget }
  242. RTGL_TextFmtArgs= $80000027; { (V38) optional arguments for RTGS_TextFmt }
  243. RTGL_Flags = RTEZ_Flags;     { (V38) various flags (see below) }
  244.  
  245.  
  246. { *** tags specific to rtGetStringA *** }
  247. RTGS_Width      = RTGL_Width;       { suggested width of requester window (in pixels) }
  248. RTGS_AllowEmpty = $80000050;        { allow empty string to be accepted - default FALSE }
  249. RTGS_GadFmt     = RTGL_GadFmt;      { (V38) string with possible responses - english default " _Ok |_Cancel" }
  250. RTGS_GadFmtArgs = RTGL_GadFmtArgs;  { (V38) optional arguments for RTGS_GadFmt }
  251. RTGS_Invisible  = RTGL_Invisible;   { (V38) invisible typing - default FALSE }
  252. RTGS_Backfill   = RTGL_Backfill;    { (V38) window backfill - default TRUE }
  253. RTGS_TextFmt    = RTGL_TextFmt;     { (V38) optional text above gadget }
  254. RTGS_TextFmtArgs= RTGL_TextFmtArgs; { (V38) optional arguments for RTGS_TextFmt }
  255. RTGS_Flags      = RTEZ_Flags;       { (V38) various flags (see below) }
  256.  
  257.  
  258. { *** tags specific to rtFileRequestA *** }
  259. RTFI_Flags      = $80000028; { various flags (see below) }
  260. RTFI_Height     = $80000029; { suggested height of file requester }
  261. RTFI_OkText     = $8000002A; { replacement text for 'Ok' gadget (max 6 chars) }
  262. RTFI_VolumeRequest=$8000002B;{ (V38) bring up volume requester, tag data holds flags (see below) }
  263. RTFI_FilterFunc = $8000002C; { (V38) call this hook for every file in the directory }
  264. RTFI_AllowEmpty = $8000002D; { (V38) allow empty file to be accepted - default FALSE }
  265.  
  266.  
  267. { *** tags specific to rtFontRequestA *** }
  268. RTFO_Flags      = RTFI_Flags;  { various flags (see below) }
  269. RTFO_Height     = RTFI_Height; { suggested height of font requester }
  270. RTFO_OkText     = RTFI_OkText; { replacement text for 'Ok' gadget (max 6 chars) }
  271. RTFO_SampleHeight=$8000003C;   { suggested height of font sample display - default 24 }
  272. RTFO_MinHeight  = $8000003D;   { minimum height of font displayed }
  273. RTFO_MaxHeight  = $8000003E;   { maximum height of font displayed }
  274. { [($8000003F) to ($80000042) used below] }
  275. RTFO_FilterFunc = RTFI_FilterFunc;{ (V38) call this hook for every font }
  276.  
  277.  
  278. { *** (V38) tags for rtScreenModeRequestA *** }
  279. RTSC_Flags         = RTFI_Flags; { various flags (see below) }
  280. RTSC_Height        = RTFI_Height;{ suggested height of screenmode requester }
  281. RTSC_OkText        = RTFI_OkText;{ replacement text for 'Ok' gadget (max 6 chars) }
  282. RTSC_PropertyFlags = $8000005A;  { property flags (see also RTSC_PropertyMask) }
  283. RTSC_PropertyMask  = $8000005B;  { property mask - default all bits in RTSC_PropertyFlags considered }
  284. RTSC_MinWidth      = $8000005C;  { minimum display width allowed }
  285. RTSC_MaxWidth      = $8000005D;  { maximum display width allowed }
  286. RTSC_MinHeight     = $8000005E;  { minimum display height allowed }
  287. RTSC_MaxHeight     = $8000005F;  { maximum display height allowed }
  288. RTSC_MinDepth      = $80000060;  { minimum display depth allowed }
  289. RTSC_MaxDepth      = $80000061;  { maximum display depth allowed }
  290. RTSC_FilterFunc    = RTFI_FilterFunc;{ call this hook for every display mode id }
  291.  
  292.  
  293. { *** tags for rtChangeReqAttrA *** }
  294. RTFI_Dir = $80000032;           { file requester - set directory }
  295. RTFI_MatchPat = $80000033;      { file requester - set wildcard pattern }
  296. RTFI_AddEntry = $80000034;      { file requester - add a file or directory to the buffer }
  297. RTFI_RemoveEntry = $80000035;   { file requester - remove a file or directory from the buffer }
  298. RTFO_FontName = $8000003F;      { font requester - set font name of selected font }
  299. RTFO_FontHeight = $80000040;    { font requester - set font size }
  300. RTFO_FontStyle = $80000041;     { font requester - set font style }
  301. RTFO_FontFlags = $80000042;     { font requester - set font flags }
  302. RTSC_ModeFromScreen = $80000050;{ (V38) screenmode requester - get display attributes from screen }
  303. RTSC_DisplayID = $80000051;     { (V38) screenmode requester - set display mode id (32-bit extended) }
  304. RTSC_DisplayWidth = $80000052;  { (V38) screenmode requester - set display width }
  305. RTSC_DisplayHeight = $80000053; { (V38) screenmode requester - set display height }
  306. RTSC_DisplayDepth = $80000054;  { (V38) screenmode requester - set display depth }
  307. RTSC_OverscanType = $80000055;  { (V38) screenmode requester - set overscan TYPE, 0 for regular size }
  308. RTSC_AutoScroll = $80000056;    { (V38) screenmode requester - set autoscroll }
  309.  
  310.  
  311. { *** tags for rtPaletteRequestA *** }
  312. { initially selected color - default 1 }
  313.     RTPA_Color = $80000046;
  314.  
  315. { *** tags for rtReqHandlerA *** }
  316. { END requester by software control, set tagdata to REQ_CANCEL, REQ_OK or
  317.   in case of rtEZRequest to the return value }
  318.     RTRH_EndRequest = $800003C;
  319.  
  320. { *** tags for rtAllocRequestA *** }
  321. { no tags defined yet }
  322.  
  323. {************
  324. * RT_ReqPos *
  325. ************}
  326.   REQPOS_POINTER = 0;
  327.   REQPOS_CENTERWIN = 1;
  328.   REQPOS_CENTERSCR = 2;
  329.   REQPOS_TOPLEFTWIN = 3;
  330.   REQPOS_TOPLEFTSCR = 4;
  331.  
  332. {******************
  333. * RTRH_EndRequest *
  334. ******************}
  335.   REQ_CANCEL = 0;
  336.   REQ_OK = 1;
  337.  
  338. {***************************************
  339. * flags for RTFI_Flags and RTFO_Flags  *
  340. * or filereq->Flags and fontreq->Flags *
  341. ***************************************}
  342.   FREQB_NOBUFFER = 2;
  343.   FREQF_NOBUFFER = 4;
  344.  
  345. {*****************************************
  346. * flags for RTFI_Flags or filereq->Flags *
  347. *****************************************}
  348.   FREQB_MULTISELECT = 0;
  349.   FREQF_MULTISELECT = 1;
  350.   FREQB_SAVE = 1;
  351.   FREQF_SAVE = 2;
  352.   FREQB_NOFILES = 3;
  353.   FREQF_NOFILES = 8;
  354.   FREQB_PATGAD = 4;
  355.   FREQF_PATGAD = 16;
  356.   FREQB_SELECTDIRS = 12;
  357.   FREQF_SELECTDIRS = 4096;
  358.  
  359. {*****************************************
  360. * flags for RTFO_Flags or fontreq->Flags *
  361. *****************************************}
  362.   FREQB_FIXEDWIDTH = 5;
  363.   FREQF_FIXEDWIDTH = 32;
  364.   FREQB_COLORFONTS = 6;
  365.   FREQF_COLORFONTS = 64;
  366.   FREQB_CHANGEPALETTE = 7;
  367.   FREQF_CHANGEPALETTE = 128;
  368.   FREQB_LEAVEPALETTE = 8;
  369.   FREQF_LEAVEPALETTE = 256;
  370.   FREQB_SCALE = 9;
  371.   FREQF_SCALE = 512;
  372.   FREQB_STYLE = 10;
  373.   FREQF_STYLE = 1024;
  374.  
  375. {*****************************************************
  376. * (V38) flags for RTSC_Flags or screenmodereq->Flags *
  377. *****************************************************}
  378.   SCREQB_SIZEGADS = 13;
  379.   SCREQF_SIZEGADS = 8192;
  380.   SCREQB_DEPTHGAD = 14;
  381.   SCREQF_DEPTHGAD = 16384;
  382.   SCREQB_NONSTDMODES = 15;
  383.   SCREQF_NONSTDMODES = 32768;
  384.   SCREQB_GUIMODES = 16;
  385.   SCREQF_GUIMODES = 65536;
  386.   SCREQB_AUTOSCROLLGAD = 18;
  387.   SCREQF_AUTOSCROLLGAD = 262144;
  388.   SCREQB_OVERSCANGAD = 19;
  389.   SCREQF_OVERSCANGAD = 524288;
  390.  
  391. {*****************************************
  392. * flags for RTEZ_Flags or reqinfo->Flags *
  393. *****************************************}
  394.   EZREQB_NORETURNKEY = 0;
  395.   EZREQF_NORETURNKEY = 1;
  396.   EZREQB_LAMIGAQUAL = 1;
  397.   EZREQF_LAMIGAQUAL = 2;
  398.   EZREQB_CENTERTEXT = 2;
  399.   EZREQF_CENTERTEXT = 4;
  400.  
  401. {***********************************************
  402. * (V38) flags for RTGL_Flags or reqinfo->Flags *
  403. ***********************************************}
  404.   GLREQB_CENTERTEXT = EZREQB_CENTERTEXT;
  405.   GLREQF_CENTERTEXT = EZREQF_CENTERTEXT;
  406.   GLREQB_HIGHLIGHTTEXT = 3;
  407.   GLREQF_HIGHLIGHTTEXT = 8;
  408.  
  409. {***********************************************
  410. * (V38) flags for RTGS_Flags or reqinfo->Flags *
  411. ***********************************************}
  412.   GSREQB_CENTERTEXT = EZREQB_CENTERTEXT;
  413.   GSREQF_CENTERTEXT = EZREQF_CENTERTEXT;
  414.   GSREQB_HIGHLIGHTTEXT = GLREQB_HIGHLIGHTTEXT;
  415.   GSREQF_HIGHLIGHTTEXT = GLREQF_HIGHLIGHTTEXT;
  416.  
  417. {*****************************************
  418. * (V38) flags for RTFI_VolumeRequest tag *
  419. *****************************************}
  420.   VREQB_NOASSIGNS=0;
  421.   VREQF_NOASSIGNS=1;
  422.   VREQB_NODISKS=1;
  423.   VREQF_NODISKS=2;
  424.   VREQB_ALLDISKS=2;
  425.   VREQF_ALLDISKS=4;
  426.  
  427. {*
  428.    Following things are obsolete in ReqTools V38.
  429.    DON'T USE THESE IN NEW CODE!
  430. *}
  431.   REQHOOK_WILDFILE=0;
  432.   REQHOOK_WILDFONT=1;
  433.   FREQB_DOWILDFUNC=11;
  434.   FREQF_DOWILDFUNC=2048;
  435.  
  436.  
  437. {************
  438. * Functions *
  439. ************}
  440.  
  441. TYPE p_long = ^long;
  442.  
  443. VAR RTBase  : ptr;
  444.     libtest : text;
  445.  
  446. Library RTBase:
  447.   -30  : function rtAllocRequestA(d0:long,a0:p_TagItem):ptr;
  448.   -36  : procedure rtFreeRequest(a1:ptr);
  449.   -42  : procedure rtFreeReqBuffer(a1:ptr);
  450.   -48  : function rtChangeReqAttr(a1:ptr,a0:p_TagItem):long;
  451.   -54  : function rtFileRequestA(a1:p_rtFileRequester,a2:str,a3:str,a0:p_TagItem):long;
  452.   -60  : procedure rtFreeFileList(a0:p_rtFileList);
  453.   -66  : function rtEZRequestA(a1:str,a2:str,a3:p_rtReqInfo,a4:ptr,a0:p_TagItem):long;
  454.   -72  : function rtGetStringA(a1:str,d0:long,a2:str,a3:p_rtReqInfo,a0:p_TagItem):long;
  455.   -78  : function rtGetLongA(a1:p_long,a2:str,a3:p_rtReqInfo,a0:p_TagItem):long;
  456.  {-84  : function rtInternalGetPasswordA (...) ;
  457.   -90  : function rtInternalEnterPasswordA (...) ;  private Functions !!! }
  458.   -96  : function rtFontRequestA(a1:p_rtFontRequester,a3:str,a0:p_TagItem):boolean;
  459.   -102 : function rtPaletteRequestA(a2:str,a3:p_rtReqInfo,a0:p_TagItem):long;
  460.   -108 : function rtReqHandlerA(a1:p_rtHandlerInfo,d0:long,a0:p_TagItem):long;
  461.   -114 : procedure rtSetWaitPointer(a0:p_Window);
  462.   -120 : function rtGetVScreenSize(a0:p_Screen,a1:p_long,a2:p_long):long;
  463.   -126 : procedure rtSetReqPosition(d0:long,a0:p_NewWindow,a1:p_Screen,a2:p_Window);
  464.   -132 : procedure rtSpread(a0:p_long,a1:p_long,d0:long,d1:long,d2:long,d3:long);
  465.   -138 : procedure rtScreenToFrontSafely(a0:p_Screen);
  466.   -144 : function rtScreenModeRequestA(a1:p_rtScreenModeRequester,a3:str,a0:p_TagItem):boolean;
  467.   -150 : procedure rtCloseWindowSafely(a0:p_Window);
  468.   -156 : function rtLockWindow(a0:p_Window):ptr;
  469.   -162 : procedure rtUnlockWindow(a0:p_Window,a1:ptr);
  470.  {-168 : procedure rtLockPrefs (...) ;
  471.   -174 : procedure rtUnLockPrefs (...) ;  Private Functions !!!  }
  472. END;
  473.  
  474. FUNCTION  V37:boolean;
  475. PROCEDURE ErrorReq(Tx,Tx2:string;Fenster:p_window);
  476. FUNCTION  OpenReqtools:boolean;
  477.  
  478. IMPLEMENTATION
  479.  
  480. FUNCTION V37;
  481. VAR  lib: p_library;
  482. BEGIN
  483.  lib:=sysbase;
  484.  V37:=(lib^.lib_version>=37);
  485. END;
  486.  
  487. PROCEDURE ErrorReq;
  488. VAR AutoTx1,Autotx2 : IntuiText;
  489.     Autohelp        : boolean;
  490. BEGIN
  491.  Autotx1:=IntuiText(2,0,0,20,10,nil,Tx,NIL);
  492.  Autotx2:=IntuiText(2,0,0,2,3,nil,Tx2,NIL);
  493.  Autohelp:=AutoRequest(Fenster,^AutoTx1,NIL,^Autotx2,0,0,330,80);
  494. END;
  495.  
  496. FUNCTION OpenReqtools;
  497. BEGIN
  498.  RTBase:=OpenLibrary(REQTOOLSNAME,REQTOOLSVERSION);
  499.  IF RTBase=NIL
  500.   THEN
  501.    BEGIN
  502.     ErrorReq('Can`t find: ReqTools.library (V38)','Sorry',nil);
  503.     OpenReqtools:=false;
  504.    END
  505.   ELSE
  506.    OpenReqtools:=true;
  507. END;
  508.  
  509. END.
  510.  
  511.  
  512.